cluster_link: improve comment for prefix truncation delay logic#29510
Merged
michael-redpanda merged 1 commit intoredpanda-data:devfrom Feb 4, 2026
Merged
Conversation
Clarifies that the delay prevents data loss when the source partition performs prefix truncation in the middle of a batch. The replicator needs to replicate the entire batch before the shadow partition can safely truncate.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves code clarity by adding a comprehensive comment explaining the delay logic for prefix truncation in cluster link replication. The enhancement addresses the scenario where a source partition performs prefix truncation that lands in the middle of a batch, which could lead to data loss if the shadow partition truncates before the replicator finishes replicating the entire batch.
Changes:
- Added detailed comment explaining why prefix truncation must be delayed until the shadow partition has fully replicated batches up to or past the source start offset
- Introduced local variables (
shadow_partition_hwmandsource_lso) to make the logic more readable and support the explanation in the comment
bharathv
approved these changes
Feb 3, 2026
Contributor
Author
|
/ci-repeat 10 |
Collaborator
CI test resultstest results on build#80087
|
Contributor
Author
|
The two failures were not related to the change |
Collaborator
|
/backport v25.3.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarifies that the delay prevents data loss when the source partition performs prefix truncation in the middle of a batch. The replicator needs to replicate the entire batch before the shadow partition can safely truncate.
Backports Required
Release Notes